package com.hirain.command;

/**
 * 远程控制器，用来调用命令
 * Created by caicf on 2016/8/24.
 */
public class SimpleRemoteControl {
    private Command command;

    public void setCommand(Command command) {
        this.command = command;
    }

    public void buttonWasPressed() {
        command.execute();
    }

    public void canel() {
        command.undo();
    }
}
